home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr23 / tlxtw204.zip / QUICMENU.SLT < prev    next >
Text File  |  1995-01-21  |  14KB  |  227 lines

  1. // Quicmenu.slt Ctrl-F3 Shows Tradewars internal quick help screens
  2. //////////////////////////////////////////////////////////////////////////////
  3. main()
  4. {
  5.     str prompt[20];
  6.     int osk,r;
  7.     osk=_scr_chk_key;
  8.     _scr_chk_key=0;
  9.     cursor_onoff(0);
  10.     get_prompt(prompt);
  11.     r=get_help(prompt);
  12.     cputc(r);
  13.     cursor_onoff(1);
  14.     _scr_chk_key=osk;
  15. }
  16. //////////////////////////////////////////////////////////////////////////////
  17. get_prompt(str prompt)
  18. {
  19.     int x,y;
  20.     x=getx();y=gety();
  21.     vgetchrs(0,y,prompt,0,7);
  22.   //pstraxy(prompt,0,y,31);
  23.     gotoxy(x,y);
  24.     return prompt;
  25. }
  26. /////////////////////////////////////////////////////////////////////////////
  27. get_help( str prompt)
  28. {
  29.     int bcolor=23,i,vh;
  30.     int a=3,b=5,k;
  31.     if((i=strposi("CommandComputeCorpora<StarDo<Galact<Hardwa<FedPol<Shipya<TavernPlanet Citadel",prompt,0))<0) {
  32.         soft_wind("Goto any Tradewars prompt.",30);
  33.         return 0;
  34.     }
  35.     vh=vsavearea(0,0,79,24);
  36.     if(strpos(prompt,"Command",0)>-1) {
  37.         pstraxy("╔══════════════════════════════ 2 0 0 2 ═════════════════════════════════╗",a, b  ,bcolor);
  38.         pstraxy("║        Navigation            Computer              Tactical            ║",a, b+1,bcolor);
  39.         pstraxy("║        =-=-==-=-=            =-=--=-=              =-=--=-=            ║",a, b+2,bcolor);
  40.         pstraxy("║ <D> Re-Display Sector <C> Onboard Computer <A> Attack Enemy SpaceCraft ║",a, b+3,bcolor);
  41.         pstraxy("║ <P> Port and Trade    <X> Transporter Pad  <E> Use SubSpace EtherProbe ║",a, b+4,bcolor);
  42.         pstraxy("║ <M> Move to a Sector  <I> Ship Information <F> Take or Leave Fighters  ║",a, b+5,bcolor);
  43.         pstraxy("║ <L> Land on a Planet  <T> Corporate Menu   <G> Show Deployed Fighters  ║",a, b+6,bcolor);
  44.         pstraxy("║ <S> Long Range Scan   <U> Use Genesis Torp <H> Handle Space Mines      ║",a, b+7,bcolor);
  45.         pstraxy("║ <R> Release Beacon    <J> Jettison Cargo   <K> Show Deployed Mines     ║",a, b+8,bcolor);
  46.         pstraxy("║ <W> Tow SpaceCraft    <B> Interdict Ctrl   <O> Starport Construction   ║",a, b+9,bcolor);
  47.         pstraxy("║                       <!> Main Menu Help                               ║",a,b+10,bcolor);
  48.         pstraxy("║ <Q> Quit and Exit     <Z> TradeWars DOCS   <V> View Game Status        ║",a,b+11,bcolor);
  49.         pstraxy("╚════════════════════════════════ v2 ════════════════════════════════════╝",a,b+12,bcolor);
  50.     } else
  51.     if(strpos(prompt,"Compute",0)>-1) {
  52.         pstraxy("╔═══════════════════════════════ 2 0 0 2 ════════════════════════════════╗",a, b  ,bcolor);
  53.         pstraxy("║ -=-   Navigation   -=-  -=-      Misc      -=-   -=-   Displays   -=-  ║",a, b+1,bcolor);
  54.         pstraxy("║ <F> Course Plotter      <A> Make Announcement    <C> View Ship Catalog ║",a, b+2,bcolor);
  55.         pstraxy("║ <I> Inter Sector Warps  <B> Begin Self Destruct  <D> Scan Daily Log    ║",a, b+3,bcolor);
  56.         pstraxy("║ <K> Your Known Universe <N> Toggle ANSI On/Off   <E> Evil Trader Class ║",a, b+4,bcolor);
  57.         pstraxy("║ <R> Port Report         <O> Change Ship Settings <G> Good Trader Class ║",a, b+5,bcolor);
  58.         pstraxy("║ <U> T-warp preference   <P> Fire Photon Missile  <H> Alien Trader Rank ║",a, b+6,bcolor);
  59.         pstraxy("║ <V> Avoid Sectors       <M> Re-Read Your Mail    <J> Planetary Specs   ║",a, b+7,bcolor);
  60.         pstraxy("║ <X> List Current Avoids <S> Send Mail            <L> List Trader Rank  ║",a, b+8,bcolor);
  61.         pstraxy("║ <!> Computer Help       <T> Current Ship Time    <Y> Personal Planets  ║",a, b+9,bcolor);
  62.         pstraxy("║ <Q> Exit Computer       <W> Use Mine Disruptor   <Z> Active Ship Scan  ║",a,b+10,bcolor);
  63.         pstraxy("╚═════════════════════════════════ v2 ═══════════════════════════════════╝",a,b+11,bcolor);
  64.     } else
  65.     if(strpos(prompt,"Corpora",0)>-1) {
  66.         pstraxy("╔══════════════════════ 2 0 0 2 ═════════════════════════╗",a, b  ,bcolor);
  67.         pstraxy("║ <D> Display Corporations    <X> Leave Your Corporation ║",a, b+1,bcolor);
  68.         pstraxy("║ <J> Join a Corporation      <L> List Corporate Planets ║",a, b+2,bcolor);
  69.         pstraxy("║ <M> Make a New Corporation  <!> Corporation Help       ║",a, b+3,bcolor);
  70.         pstraxy("║ <Q> QUIT Corp Menu          <A> Show Corporate Assets  ║",a, b+4,bcolor);
  71.         pstraxy("║ -- (Corporations Only) --       & Member Locations     ║",a, b+5,bcolor);
  72.         pstraxy("║ <C> Credit Transfer         <T> Send Corporate Memo    ║",a, b+6,bcolor);
  73.         pstraxy("║ <F> Fighter Transfer          - C.E.O.s  Only -        ║",a, b+7,bcolor);
  74.         pstraxy("║ <H> Mine Transfer           <P> Corporate Security     ║",a, b+8,bcolor);
  75.         pstraxy("║ <S> Shields Transfer        <R> Drop Corporate Member  ║",a, b+9,bcolor);
  76.         pstraxy("╚════════════════════════ v2 ════════════════════════════╝",a,b+10,bcolor);
  77.     } else
  78.     if(strpos(prompt,"<StarDo",0)>-1) {
  79.         pstraxy("╔═══════════════════════════════════════╗",a, b  ,bcolor);
  80.         pstraxy("║     Obvious places to go are:         ║",a, b+1,bcolor);
  81.         pstraxy("║                                       ║",a, b+2,bcolor);
  82.         pstraxy("║ <C> The CinePlex Videon Theatres      ║",a, b+3,bcolor);
  83.         pstraxy("║ <G> The 2nd National Galactic Bank    ║",a, b+4,bcolor);
  84.         pstraxy("║ <H> The Stellar Hardware Emporium     ║",a, b+5,bcolor);
  85.         pstraxy("║ <P> The Federal Space Police HQ       ║",a, b+6,bcolor);
  86.         pstraxy("║ <S> The Federation Shipyards          ║",a, b+7,bcolor);
  87.         pstraxy("║ <T> The Lost Trader's Tavern          ║",a, b+8,bcolor);
  88.         pstraxy("║                                       ║",a, b+9,bcolor);
  89.         pstraxy("║ <!> Stardock Help                     ║",a,b+10,bcolor);
  90.         pstraxy("║ <Q> Return to your ship and leave     ║",a,b+11,bcolor);
  91.         pstraxy("╚═══════════════════════════════════════╝",a,b+12,bcolor);
  92.     } else
  93.     if(strpos(prompt,"<Galact",0)>-1) {
  94.         pstraxy("╔══════════════════════╗",a, b  ,bcolor);
  95.         pstraxy("║  The Galactic Bank:  ║",a, b+1,bcolor);
  96.         pstraxy("║                      ║",a, b+2,bcolor);
  97.         pstraxy("║ <D> Make a Deposit   ║",a, b+3,bcolor);
  98.         pstraxy("║ <E> Examine Balance  ║",a, b+4,bcolor);
  99.         pstraxy("║ <T> Transfer Funds   ║",a, b+5,bcolor);
  100.         pstraxy("║ <W> Withdraw Funds   ║",a, b+6,bcolor);
  101.         pstraxy("║                      ║",a, b+7,bcolor);
  102.         pstraxy("║ <Q> Leave the Bank   ║",a, b+8,bcolor);
  103.         pstraxy("╚══════════════════════╝",a, b+9,bcolor);
  104.     } else
  105.     if(strpos(prompt,"<Hardwa",0)>-1) { b=1;
  106.         pstraxy("╔═══════════════════════════════╗",a, b  ,bcolor);
  107.         pstraxy("║ The Emporium Daily Specials:  ║",a, b+1,bcolor);
  108.         pstraxy("║                               ║",a, b+2,bcolor);
  109.         pstraxy("║ <A> Atomic Detonators         ║",a, b+3,bcolor);
  110.         pstraxy("║ <B> Marker Beacons            ║",a, b+4,bcolor);
  111.         pstraxy("║ <C> Corbomite Devices         ║",a, b+5,bcolor);
  112.         pstraxy("║ <D> Cloaking Devices          ║",a, b+6,bcolor);
  113.         pstraxy("║ <E> SubSpace Ether Probes     ║",a, b+7,bcolor);
  114.         pstraxy("║ <F> Planet Scanners           ║",a, b+8,bcolor);
  115.         pstraxy("║ <L> Limpet Tracking Mines     ║",a, b+9,bcolor);
  116.         pstraxy("║ <M> Space Mines               ║",a,b+10,bcolor);
  117.         pstraxy("║ <P> Photon Missiles           ║",a,b+11,bcolor);
  118.         pstraxy("║ <R> Long Range Scanners       ║",a,b+12,bcolor);
  119.         pstraxy("║ <S> Mine Disruptors           ║",a,b+13,bcolor);
  120.         pstraxy("║ <T> Genesis Torpedoes         ║",a,b+14,bcolor);
  121.         pstraxy("║ <W> TransWarp Drives          ║",a,b+15,bcolor);
  122.         pstraxy("║ <Y> Psychic Probes            ║",a,b+16,bcolor);
  123.         pstraxy("║                               ║",a,b+17,bcolor);
  124.         pstraxy("║ <!> Hardware Emporium Help    ║",a,b+18,bcolor);
  125.         pstraxy("║ <Q> Leave the Emporium        ║",a,b+19,bcolor);
  126.         pstraxy("╚═══════════════════════════════╝",a,b+20,bcolor);
  127.     } else
  128.     if(strpos(prompt,"<FedPol",0)>-1) {
  129.         pstraxy("╔═══════════════════════════════════════╗",a, b  ,bcolor);
  130.         pstraxy("║ <A> Apply for a Federal Commission    ║",a, b+1,bcolor);
  131.         pstraxy("║ <C> Claim a Federation Reward         ║",a, b+2,bcolor);
  132.         pstraxy("║ <E> Examine the Ten Most Wanted List  ║",a, b+3,bcolor);
  133.         pstraxy("║ <P> Post a Reward on someone          ║",a, b+4,bcolor);
  134.         pstraxy("║                                       ║",a, b+5,bcolor);
  135.         pstraxy("║ <!> FedPolice Help                    ║",a, b+6,bcolor);
  136.         pstraxy("║ <Q> Leave the Police Station          ║",a, b+7,bcolor);
  137.         pstraxy("╚═══════════════════════════════════════╝",a, b+8,bcolor);
  138.     } else
  139.     if(strpos(prompt,"<Shipya",0)>-1) {
  140.         pstraxy("╔══════════════════════════════╗",a, b  ,bcolor);
  141.         pstraxy("║  The Federation Shipyards:   ║",a, b+1,bcolor);
  142.         pstraxy("║                              ║",a, b+2,bcolor);
  143.         pstraxy("║ <B> Buy a New Ship           ║",a, b+3,bcolor);
  144.         pstraxy("║ <S> Sell extra Ships         ║",a, b+4,bcolor);
  145.         pstraxy("║ <E> Examine Ship Specs       ║",a, b+5,bcolor);
  146.         pstraxy("║ <P> Buy Class 0 Items        ║",a, b+6,bcolor);
  147.         pstraxy("║ <R> Change Ship Registration ║",a, b+7,bcolor);
  148.         pstraxy("║                              ║",a, b+8,bcolor);
  149.         pstraxy("║ <!> Shipyards Help           ║",a, b+9,bcolor);
  150.         pstraxy("║ <Q> Leave the Shipyards      ║",a,b+10,bcolor);
  151.         pstraxy("╚══════════════════════════════╝",a,b+11,bcolor);
  152.     } else
  153.     if(strpos(prompt,"<Tavern",0)>-1) {
  154.         pstraxy("╔═══════════════════════════════════════╗",a, b  ,bcolor);
  155.         pstraxy("║     Obvious things to do are:         ║",a, b+1,bcolor);
  156.         pstraxy("║                                       ║",a, b+2,bcolor);
  157.         pstraxy("║ <A> Make an Announcement              ║",a, b+3,bcolor);
  158.         pstraxy("║ <B> Buy something from the bar        ║",a, b+4,bcolor);
  159.         pstraxy("║ <C> Eavesdrop on conversations        ║",a, b+5,bcolor);
  160.         pstraxy("║ <E> Order some food                   ║",a, b+6,bcolor);
  161.         pstraxy("║ <G> Try your hand at Tri-Cron         ║",a, b+7,bcolor);
  162.         pstraxy("║ <T> Talk to the grimy Trader in back  ║",a, b+8,bcolor);
  163.         pstraxy("║ <U> Use the facilities                ║",a, b+9,bcolor);
  164.         pstraxy("║                                       ║",a,b+10,bcolor);
  165.         pstraxy("║ <!> Tavern Help                       ║",a,b+11,bcolor);
  166.         pstraxy("║ <Q> Leave the Tavern                  ║",a,b+12,bcolor);
  167.         pstraxy("╚═══════════════════════════════════════╝",a,b+13,bcolor);
  168.     } else
  169.     if(strpos(prompt,"Planet ",0)>-1) {
  170.         pstraxy("╔═════════════════════════════╗",a, b  ,bcolor);
  171.         pstraxy("║ <A> Take All Products       ║",a, b+1,bcolor);
  172.         pstraxy("║ <C> Enter Citadel           ║",a, b+2,bcolor);
  173.         pstraxy("║ <D> Display Planet          ║",a, b+3,bcolor);
  174.         pstraxy("║ <M> Change Military Levels  ║",a, b+4,bcolor);
  175.         pstraxy("║ <O> Claim Ownership of      ║",a, b+5,bcolor);
  176.         pstraxy("║       this planet           ║",a, b+6,bcolor);
  177.         pstraxy("║ <P> Change Population Lvls  ║",a, b+7,bcolor);
  178.         pstraxy("║ <S> Load/Unload Colonists   ║",a, b+8,bcolor);
  179.         pstraxy("║ <T> Take or Leave Product   ║",a, b+9,bcolor);
  180.         pstraxy("║ <Z> Try to Destroy Planet   ║",a,b+10,bcolor);
  181.         pstraxy("║                             ║",a,b+11,bcolor);
  182.         pstraxy("║ <!> Planetary Help          ║",a,b+12,bcolor);
  183.         pstraxy("║ <Q> Leave this Planet       ║",a,b+13,bcolor);
  184.         pstraxy("╚═════════════════════════════╝",a,b+14,bcolor);
  185.     } else
  186.     if(strpos(prompt,"Citadel",0)>-1) {
  187.         pstraxy("╔══════════════════════════════════════════════════════════╗",a, b  ,bcolor);
  188.         pstraxy("║ <B> Transporter Control      <N> Interdictor Control     ║",a, b+1,bcolor);
  189.         pstraxy("║ <C> Engage Ship's Computer   <P> Planetary TransWarp     ║",a, b+2,bcolor);
  190.         pstraxy("║ <D> Display Traders Here     <R> Remain here overnight   ║",a, b+3,bcolor);
  191.         pstraxy("║ <E> Exchange Trader Ships    <S> Scan this sector        ║",a, b+4,bcolor);
  192.         pstraxy("║ <G> Shield Generator Control <T> Treasury Fund Transfers ║",a, b+5,bcolor);
  193.         pstraxy("║ <I> Personal Info            <U> Upgrade Citadel         ║",a, b+6,bcolor);
  194.         pstraxy("║ <L> Quasar Cannon R-Level    <V> Evict the other Traders ║",a, b+7,bcolor);
  195.         pstraxy("║ <M> Military Reaction Level  <X> Corporation Menu        ║",a, b+8,bcolor);
  196.         pstraxy("║ <!> Citadel Help             <Q> Leave the Citadel       ║",a, b+9,bcolor);
  197.         pstraxy("╚══════════════════════════════════════════════════════════╝",a,b+10,bcolor);
  198.     }
  199.     k=inkeyw();
  200.     vrstrarea(vh);
  201.     return k;
  202. }
  203. ///////////////////////////////////////////////////////////////////////////////
  204. //                         Soft Wind
  205. soft_wind(str message, int duration)
  206. {
  207.     int old_chk_key;
  208.     old_chk_key = _scr_chk_key;
  209.     _scr_chk_key = 0;
  210.     int l, h, x, y, key = 0, ts;
  211.     cursor_onoff(0);
  212.     x=getx(); y=gety();
  213.     l = strlen(message)/2;
  214.     h = vsavearea(37-l, 10, 43+l, 14);
  215.     box(37-l, 10, 43+l, 14, 3, 0, 5 );
  216.     pstraxy(message, 40-l  , 12, 11 );
  217.     ts = timer_start(duration);
  218.     while( !key && !time_up(ts)) key=inkey();
  219.     vrstrarea(h);
  220.     cursor_onoff(1);
  221.     gotoxy(x,y);
  222.     timer_free(ts);
  223.     _scr_chk_key = old_chk_key;
  224.     return key;
  225. }
  226. //////////////////////////////////////////////////////////////////////////////
  227.